<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户列表</title>

    <link rel="stylesheet" href="http://cdn.viptool.cn/lib/bootstrap/3.3.5/css/bootstrap.min.css">
    <link href="../../resource/hotui/css/font-awesome.min.css" th:href="@{/resource/hotui/css/font-awesome.min.css}"
          rel="stylesheet">
    <!-- Morris -->
    <link href="http://cdn.viptool.cn/lib/morris.js/0.4.3/morris.css" rel="stylesheet">
    <link href="../../resource/hotui/css/style.min-1.0.8.css" th:href="@{/resource/hotui/css/style.min-1.0.8.css}"
          rel="stylesheet">
</head>

<body>
<div class="wrapper wrapper-content   tooltip-demo">
    <input type="hidden" id="groupId" th:value="${groupId}"/>
    <!--list-->
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins m-b-none">
                <div class="ibox-content p-xxs no-top-border">

                    <div class="panel-body">
                        <table class="table table-bordered table-hover table-center">
                            <thead>
                            <tr>
                                <th>报警用户1</th>
                                <th>用户类型</th>
                                <th>基站</th>
                                <th>定位器</th>
                                <th>卡</th>
                                <th>报警时间</th>
                            </tr>
                            </thead>
                            <tbody>

                            <tr th:each="item:${list}">
                                <td th:text="${item.realName}"></td>
                                <td th:text="${item.userType.desc}"></td>
                                <td th:text="${item.stationId}"></td>

                                <td th:text="${item.stationId}"></td>
                                <td th:text="${item.cardId}"></td>
                                <td th:text="${#temporals.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                            </tr>
                            </tbody>
                        </table>
                        <p style="float: left; margin: 20px 0;">
                            共<span th:text="${totalRecords}"></span>条记录，当前第<span
                                th:text="${pageIndex}"></span>/<span
                                th:text="${totalPages==0?1:totalPages}"></span>，每页20条记录
                        </p>
                        <ul style="float: right;" class="pagination pagination-split">
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--基础框架js-->
<script src="../../resource/js/jquery.min.js?v=2.1.4" th:src="@{/resource/js/jquery.min.js(v=2.1.4)}"></script>
<script src="../../resource/js/bootstrap.min.js?v=3.3.5" th:src="@{/resource/js/bootstrap.min.js(v=3.3.5)}"></script>
<script src="../../resource/hotui/js/hot/bootstrap.hot.extra-utils.js"
        th:src="@{/resource/hotui/js/hot/bootstrap.hot.extra-utils.js(123123)}"></script>
<script src="../../resource/hotui/js/hot/bootstrap.hot.extra-init.js"></script>

<script src="../../resource/hotui/js/content.min.js" th:src="@{/resource/hotui/js/content.min.js}"></script>

<script type="text/javascript" th:inline="javascript">
    const pageIndex = /*[[${pageIndex}]]*/  1;
    const totalPages = /*[[${totalPages}]]*/  1;
    const pageUri = /*[[@{/msg/alarm/msgList}]]*/  "";
</script>

<script type="text/javascript">
    $(function () {
        //初始化分页
        var pageinate = new hot.paging(".pagination", pageIndex, totalPages, 7);

        pageinate.init(function (p) {
            window.location.href = pageUri + "?pageIndex=" + p + "&groupId=" + $("#groupId").val();
        });
    });
</script>

</body>
</html>
